/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package east2west.service;

import east2west.dao.FlightDAO;
import east2west.dto.FlightsDTO;
import java.util.ArrayList;

/**
 *
 * @author anhtuan
 */
public class FlightsService {

    FlightDAO dao = new FlightDAO();

    public ArrayList<FlightsDTO> readByAll() {
        return dao.readByAll();
    }
    public ArrayList<FlightsDTO> findByTopFlight(){
        return dao.findByTop();
    }
    public FlightsDTO findByid(int id){
        return dao.findById(id);
    }
    public ArrayList<FlightsDTO> findByOrhterId(int id){
        return dao.findAllOrtherId(id);
    }
    public ArrayList<FlightsDTO> getFlightDeparture(){
        return dao.getFlightDeparture();
    }
    public ArrayList<FlightsDTO> getFlightDestination(){
        return dao.getFlightDestination();
    }
     public ArrayList<FlightsDTO> findByDTO(FlightsDTO dto){
        return dao.findByDTO(dto);
    }
}
